package com.heu.blood.statistic.controller;


import com.heu.blood.common.aop.ControllerLogAnnotation;
import com.heu.blood.common.utils.R;
import com.heu.blood.statistic.entity.BloodDataAnalysis;
import com.heu.blood.statistic.service.BloodDataAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/statistic")
public class BloodDataAnalysisController {

    @Autowired
    private BloodDataAnalysisService bloodDataAnalysisService;


    /**
     * 获取首页分析数据
     * @return
     */
    @GetMapping
    @ControllerLogAnnotation(module = "首页分析数据", operate = "获取首页分析数据")
    public R getDataAnalysis(){
        BloodDataAnalysis bloodDataAnalysis =  bloodDataAnalysisService.getDataAnalysis();
        return R.ok().put("data", bloodDataAnalysis);
    }
}
